import service from '@/utils/request'

// 题目（题库）业务相关的 前后端交互 接口放在这里，向后端发起请求

export function getQuestionListService(params) {
  return service({
    url:"/question/list",
    method: "get",
    params
  })
}

export function addQuestionService(params = {}) {
  return service({
    url: "/question/add",
    method: "post",
    data: params,
  });
}

export function getQuestionDetailService(questionId) {
  return service({
    url: "/question/detail",
    method: "get",
    params: { questionId },
  });
}

export function editQuestionService(params = {}) {
  return service({
    url: "/question/edit",
    method: "put",
    data: params,
  });
}

export function delQuestionService(questionId) {
  return service({
    url: "/question/delete",
    method: "delete",
    params: { questionId },
  });
}